package com.lifa.service.impl;

import com.lifa.dao.RuKuDao;
import com.lifa.entity.Kucun;
import com.lifa.service.RuKuTongJiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RuKuTongJiServiceImpl implements RuKuTongJiService{
    @Autowired
    private RuKuDao ruKuTongJiDao;



    public List<Kucun> getAllRuKuAll() {
        return ruKuTongJiDao.getAllRuKu();
    }

    public List<Kucun> getAllRuKuSLAll() {
        return ruKuTongJiDao.getAllRuKuSL();
    }

    public List<Kucun> getAllRuKuPriceAll() {
        return ruKuTongJiDao.getAllRuKuPrice();
    }

    public long findTotalCount(int id) {
        return ruKuTongJiDao.getTotalCount(id);
    }

    public List<Kucun> findAll(int id, int offset, int limit) {
        return ruKuTongJiDao.query(id,offset,limit);
    }

    @Override
    public long findTotalCountRuKuMX(int id) {
        return ruKuTongJiDao.getTotalCountRuKuMX(id);
    }

    @Override
    public List<Kucun> findAllRuKuMX(int id, int offset, int limit) {
        return ruKuTongJiDao.queryRuKuMX(id,offset,limit);
    }

    @Override
    public List<Kucun> getAllRuKujmxx() {
        return ruKuTongJiDao.getAllRuKujmx();
    }


}
